from collections import Generator, Iterable, Iterator

g = (i ** 2 for i in range(5))
print(g)
print(g.__iter__())
print(g.__next__())
print(g.__next__())
print(g.__next__())
print(g.__next__())
for i in g:
    print(i)
